﻿using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZR.DataCollection.ICommunication;
using ZR.ServiceCore.Signalr;

namespace ZR.DataCollection.SingleParameter
{
    public class CurrentAppInfo
    {
        private static readonly Lazy<CurrentAppInfo> _lazy =
            new Lazy<CurrentAppInfo>(() => new CurrentAppInfo());

        public static CurrentAppInfo Current => _lazy.Value;

        /// <summary>
        /// 通讯
        /// 工作站编号 - PLC对象
        /// </summary>
        public ConcurrentDictionary<string, INormCommunication> communicationPairs = new ConcurrentDictionary<string, INormCommunication>();

        /// <summary>
        /// 扫码
        /// </summary>
        public ConcurrentDictionary<string, IScannCode> IScanCodeInterface = new ConcurrentDictionary<string, IScannCode>();

        public ICommPlcExtend? InterfaceCommExtend { get; set; }
    }
}